#ifndef __GUICONTROLLER_H__
#define __GUICONTROLLER_H__

#pragma once
#include "World.h"
#include "Event.h"
//@author dylan
class World;
class EventInstancer : public Rocket::Core::EventListenerInstancer
{
public:
	EventInstancer(World *w);
	virtual ~EventInstancer();

	/// Instances a new event handle for Invaders.
	virtual Rocket::Core::EventListener* InstanceEventListener(const Rocket::Core::String& value);

	/// Destroys the instancer.
	virtual void Release();
	World *p_world;
};
class GuiController
{
	public:
		GuiController();
		void create_pointer(World *w);
		void InitRocket(bool debug);
		void main_menu(bool first);
		void hide_main_menu();
		void process_gui_event(Rocket::Core::Event& event,const Rocket::Core::String& value);
		~GuiController();
	private:
		Rocket::Core::ElementDocument *m_menu;
		Rocket::Core::ElementDocument *m_background;
		RocketRegion *r_region;
		EventInstancer *event_instancer;
		RocketInputHandler *r_input;
		World *p_world;
};
#endif